package com.zb.entity.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.zb.annotation.IntegerPattern;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @Author WEN
 * @Date 2023/10/31 0031
 **/
@Data
@ApiModel("服务页面对象")
public class ServicePageVo {

    @ApiModelProperty(value = "服务页面ID，新增不必传，修改必传")
    private Long id;

    @NotNull(message = "服务页面类型不能为空")
    @IntegerPattern(regexp = "^(1|2|3)$", message = "服务页面类型参数不合法")
    @ApiModelProperty(value = "服务页面类型：1-工单报单端，2-服务网点端，3-仓库网点端", required = true, example = "1")
    private Integer type;

    @NotBlank(message = "页面名称不能为空")
    @Length(max = 10, message = "页面名称长度限制 10 个字符")
    @ApiModelProperty(value = "页面名称", required = true)
    private String name;

    @NotBlank(message = "页面标题不能为空")
    @Length(max = 10, message = "页面标题长度限制 10 个字符")
    @ApiModelProperty(value = "页面标题", required = true)
    private String pageTitle;

    @NotBlank(message = "页面连接不能为空")
    @Length(max = 300, message = "页面连接长度限制 300 个字符")
    @ApiModelProperty(value = "页面连接", required = true)
    private String path;

    @NotNull(message = "服务页面状态不能为空")
    @ApiModelProperty(value = "服务页面状态：false-启用，true-禁用", required = true, example = "false")
    private Boolean status;
}
